export type Locale = (typeof locales)[number];
export const locales = ["en-US", "zh-CN"] as const;
export const defaultLocale: Locale = "en-US";

export const languages = [
  { value: "en-US", label: "English" },
  { value: "zh-CN", label: "简体中文" },
];

export const getLanguage = (value: string) => {
  const language = languages.find((lang) => lang.value === value);
  return language ? language : undefined; // 如果找不到返回 undefined
};
